package com.orhonit.ipb.portal.biz;

import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.orhonit.ipb.portal.entity.GropToDept;
import com.orhonit.ipb.portal.mapper.GropToDeptMapper;
import com.orhonit.ipb.security.common.biz.BusinessBiz;


/**
 * 
 *
 * @author 
 * @email 
 * @version 2018-05-21 08:55:47
 */
@Service
public class GropToDeptBiz extends BusinessBiz<GropToDeptMapper,GropToDept> {
	@Autowired
	private GropToDeptMapper gropToDeptMapper;
	public GropToDept getdeptId(String userId){
		GropToDept result=gropToDeptMapper.getdeptId(userId);
		if(StringUtils.isNotBlank(result.getGroupId())){
			result.setDeptId(result.getGroupId());
		}
		return gropToDeptMapper.getdeptId(userId);
	}
	public List<String> getDeptList(String id) {
		// TODO Auto-generated method stub
		return gropToDeptMapper.getDeptList(id);
	}
}